<?php include _include(ADMIN_PATH.'view/htm/header.inc.htm');?>

<div class="row">
	<div class="col-lg-8 offset-lg-2">
		<div class="card">
			<div class="card-body">
				<form action="<?php echo url("plugin-setting-sg_sign_vip");?>" method="post" id="form">
						<h4 class="card-title">每日签到VIP版 设置</h4>
						<div class="form-group row">
							<label class="col-sm-3 form-control-label">签到积分字段：</label>
							<div class="col-sm-3">
								<?php echo $input['sign9']; ?>
							</div><font  class="text-small" color="#FF0000">设置用户表对应字段，方便整合其他插件</font>
						</div><div class="form-group row">
							<label class="col-sm-3 form-control-label">签到按扭背景色：</label>
							<div class="col-sm-3">
								<?php echo $input['sign10']; ?>
							</div>
						</div><div class="form-group row">
							<label class="col-sm-3 form-control-label">开启签到列表：</label>
							<div class="col-sm-9">
								<?php echo $input['sign11']; ?>
							</div>
						</div><div class="form-group row">
							<label class="col-sm-3 form-control-label">每日签到奖励：</label>
							<div class="col-sm-9">
								<?php echo $input['sign1']; ?>
							</div>
						</div><div class="form-group row">
							<label class="col-sm-3 form-control-label">连续签3天增加奖励：</label>
							<div class="col-sm-9">
								<?php echo $input['sign2']; ?>
							</div>
						</div><div class="form-group row">
							<label class="col-sm-3 form-control-label">连续签7天增加奖励：</label>
							<div class="col-sm-9">
								<?php echo $input['sign3']; ?>
							</div>
						</div><div class="form-group row">
							<label class="col-sm-3 form-control-label">连续签15天增加奖励：</label>
							<div class="col-sm-9">
								<?php echo $input['sign4']; ?>
							</div>
						</div><div class="form-group row">
							<label class="col-sm-3 form-control-label">连续签15天以上奖励：</label>
							<div class="col-sm-4">
								<?php echo $input['sign7']; ?>
							</div>
							<label class="col-sm-1 form-control-label">至</label>
							<div class="col-sm-4">
								<?php echo $input['sign8']; ?>
							</div>
						</div><div class="form-group row">
							<label class="col-sm-3 form-control-label">每日第1名增加奖励：</label>
							<div class="col-sm-9">
								<?php echo $input['sign5']; ?>
							</div>
						</div><div class="form-group row">
							<label class="col-sm-3 form-control-label">每日第2-5名增加奖励：</label>
							<div class="col-sm-9">
								<?php echo $input['sign6']; ?>
							</div>
						</div><div class="form-group row">
							<label class="col-sm-3 form-control-label"></label>
							<div class="col-sm-9">
								<button type="submit" class="btn btn-primary btn-block" id="submit" data-loading-text="<?php echo lang('submiting');?>..."><?php echo lang('confirm');?></button>
								<a role="button" class="btn btn-secondary btn-block mt-3" href="javascript:history.back();"><?php echo lang('back');?></a>
							</div>
						</div>
					</form>
				<p class="text-small text-muted">注：积分计算等于（每日签到奖励+连续签到奖励+排名奖励）</p>
			</div>
		</div>
	</div>
</div>

<?php include _include(ADMIN_PATH.'view/htm/footer.inc.htm');?>

<script>

var jform = $("#form");
var jsubmit = $("#submit");
var referer = '<?php echo url("plugin-setting-sg_sign_vip");?>';
jform.on('submit', function(){
	jform.reset();
	jsubmit.button('loading');
	var postdata = jform.serialize();
	$.xpost(jform.attr('action'), postdata, function(code, message) {
		if(code == 0) {
			$.alert(message);
			jsubmit.text(message).delay(1000).button('reset').location(referer);
			return;
		} else {
			$.alert(message);
			jsubmit.button('reset');
		}
	});
	return false;
});

</script>